feat(sourcetypes): add excel to sourcetypes files and docs about comm… - #51
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.xls/.xlsxupload support to the document ingestion pipeline using SheetJS (xlsx)## SheetNameheader + pipe-delimited rows) before chunking, so the RAG pipeline requires no changessourceTypeis set to'spreadsheet'for Excel files; the document list renders a dedicated table-cells icon for this typeChanges
Backend (
server/utils/documents.service.ts)xlsxand add Excel MIMEs toALLOWED_MIMEisAllowedMime()— accepts.xls/.xlsxby extension as fallbackdetectFileType()— returns'spreadsheet'for Excel inputsspreadsheetToText()— iteratesSheetNames, converts each sheet viasheet_to_jsoninto a markdown tableextractTextFromUpload()— routes Excel buffers throughspreadsheetToText()Config (
nuxt.config.ts)ALLOWED_FORMATSextended frompdf,md,txt→pdf,md,txt,xls,xlsxFrontend
pages/upload.vue— file inputacceptincludes.xls,.xlsxpages/documents/index.vue—getIconForType()maps'spreadsheet'→i-heroicons-table-cellsi18n (
en.json,es.json)upload.supportsupdated to list.xls, .xlsxTest plan
.xlsxfile and verify each sheet appears as a markdown table in the storedcontent.xlsfile and confirm it is processed without errors.docx) still return HTTP 415ALLOWED_FORMATSenv override still works (set topdf,txtand verify.xlsxis rejected)